import java.util.Map;

class Calculator{
    private int num1;
    private int num2;

    public Calculator() {
    }

    public Calculator(int num1, int num2) {
        this.num1 = num1;
        this.num2 = num2;
    }

    public int getNum1() {
        return num1;
    }

    public void setNum1(int num1) {
        this.num1 = num1;
    }

    public int getNum2() {
        return num2;
    }

    public void setNum2(int num2) {
        this.num2 = num2;
    }

    public int add(){
        return this.num1+this.num2;
    }
    public int sub(){
        return this.num1-this.num2;
    }
    public int mul(){
        return this.num1*this.num2;
    }
    public double div(){
        return this.num1*1.0/this.num2;
    }
}
class MyValue{
    public int val;
}
public class Testdemo2 {
    public static void swap(MyValue myValue1,MyValue myValue2){
        int temp=myValue1.val;
        myValue1.val=myValue2.val;
        myValue2.val=temp;
    }
    public static void main(String[] args) {
        MyValue myValue1=new MyValue();
        myValue1.val=10;
        MyValue myValue2=new MyValue();
        myValue1.val=20;
        System.out.println(myValue1.val);
        System.out.println(myValue2.val);
        swap(myValue1,myValue2);
        System.out.println(myValue1.val);
        System.out.println(myValue2.val);
    }
    public static void main1(String[] args) {
        Calculator calculator=new Calculator(10,20);
        /*calculator.setNum1(10);
        calculator.setNum2(20);*/
        System.out.println(calculator.add());
        System.out.println(calculator.sub());
        System.out.println(calculator.mul());
        System.out.println(calculator.div());
    }
}
